package myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 负载均衡规则配置类
 *
 * @author xieweidu
 * @createDate 2020-07-19 18:27
 */
@Configuration
public class MyRuleConfig {

    @Bean
    public IRule randomRule(){
        return new RandomRule();
    }

}
